import Layout from '@/layout'
export default {
  path: '/employees',
  component: Layout,
  children: [
    {
      // 如果二级路由的path为空字符串，那么默认显示该二级路由的组件
      path: '',
      name: 'employees',
      component: () => import('@/views/employees'),
      meta: { title: '员工', icon: 'people' }
    },
    {
      path: 'detail/:id', // 动态路由参数
      component: () => import('@/views/employees/detail'),
      hidden: true,
      // 如果添加选项props:true，那么组件中可以直接通过props获取路由参数，这里vue-router的规则
      props: true,
      meta: {
        title: '员工详情'
      }
    }
  ]
}
